package cn.ven.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Document("t_blog")
public class Blog {
    @Id
    private String id;
    @Indexed
    private String uid;
    private String title;//标题
    private String typeid;//博客内容id
    private String digest;//摘要
    private String contentId;//博客内容id
    private String author;//作者
    private Date tcreate;//发布时间
    private int thmub_num;//点赞数
    private int reading_num; //浏览数
    private int isdel; //是否是假删除
    //isdel==0的时候就是假删除，isdel==1的时候就是没删除

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public Date getTcreate() {
        return tcreate;
    }

    public void setTcreate(Date tcreate) {
        this.tcreate = tcreate;
    }

    public String getContentId() {
        return contentId;
    }

    public void setContentId(String contentId) {
        this.contentId = contentId;
    }

    public String getTypeid() {
        return typeid;
    }

    public void setTypeid(String typeid) {
        this.typeid = typeid;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public int getThmub_num() {
        return thmub_num;
    }

    public void setThmub_num(int thmub_num) {
        this.thmub_num = thmub_num;
    }

    public int getReading_num() {
        return reading_num;
    }

    public void setReading_num(int reading_num) {
        this.reading_num = reading_num;
    }

    public int getIsdel() {
        return isdel;
    }

    public void setIsdel(int isdel) {
        this.isdel = isdel;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "id='" + id + '\'' +
                ", uid='" + uid + '\'' +
                ", title='" + title + '\'' +
                ", typeid='" + typeid + '\'' +
                ", digest='" + digest + '\'' +
                ", contentId='" + contentId + '\'' +
                ", author='" + author + '\'' +
                ", tcreate=" + tcreate +
                ", thmub_num=" + thmub_num +
                ", reading_num=" + reading_num +
                ", isdel=" + isdel +
                '}';
    }
}
